import Login from './views/Login.vue'
import NotFound from './views/404.vue'
import Index from './views/Index.vue'
import Home from './views/Home.vue'
import Main from './views/Main.vue'
import CouponAct from './views/nav1/CouponAct.vue'
import ProductManage from './views/nav1/ProductManage.vue'
import ProductDetail from './views/nav1/ProductDetail.vue'
import ProductAdd from './views/nav1/ProductAdd.vue'
import ProductUpdate from './views/nav1/ProductUpdate.vue'

import user from './views/nav1/user.vue'
import Application from './views/nav2/Application.vue'
import Page4 from './views/nav2/Page4.vue'
import Page5 from './views/nav2/Page5.vue'
import CategoryList from './views/nav3/CategoryList.vue'
import ProductBrandList from './views/nav3/ProductBrandList.vue'
import ProductTemplateList from './views/nav3/ProductTemplateList.vue'
import ProductSpecificationLsit from './views/nav3/ProductSpecificationList.vue'
import CategoryChildList from './views/nav3/CategoryChildList.vue'
import CategoryAdd from './views/nav3/CategoryAdd.vue'
import CategoryUpdate from './views/nav3/CategoryUpdate.vue'
import ProductBrandAdd from './views/nav3/ProductBrandAdd.vue'
import ProductBrandUpdate from './views/nav3/ProductBrandUpdate.vue'
import ProductSpecOptions from './views/nav3/ProductSpecOptions.vue'
import ProductSpecAdd from './views/nav3/ProductSpecAdd.vue'
import ProductSpecOptionAdd from './views/nav3/ProductSpecOptionAdd.vue'
import ProductSpecUpdate from './views/nav3/ProductSpecUpdate.vue'
import ProductSpecOptionUpdate from './views/nav3/ProductSpecOptionUpdate.vue'

import ProductManageList from './views/nav3/ProductManageList.vue'
import ProductTemplateUpdate from './views/nav3/ProductTemplateUpdate.vue'
import ProductTemplateAdd from './views/nav3/ProductTemplateAdd.vue'
import GuidePageConfig from './views/nav4/GuidePageConfig.vue'
import OperateLogManage from "./views/nav4/OperateLogManage";
import CouponManage from "./views/nav1/CouponManage";
let routes = [
    {
        path: '/login',
        component: Login,
        name: '',
        hidden: true
    },
    {
        path: '/404',
        component: NotFound,
        name: '',
        hidden: true
    },
    //{ path: '/main', component: Main },
    {
        path: '/',
        component: Home,
        name: '',
        iconCls: 'el-icon-menu',
        leaf: true,//只有一个节点
        Role:0,
        children: [
            { path: '/Index', component: Index, name: '首页' }
        ]
    },
    {
        path: '/',
        component: Home,
        name: '',
        iconCls: 'el-icon-menu',//图标样式class
        leaf: true,//只有一个节点
        Role:0,
        children: [
            // { path: '/main', component: Main, name: '主页', hidden: true },
            { path: '/Application', component: Application, name: '订单管理' },
        ]
    },
    {
        path: '/',
        component: Home,
        name: '商品管理',
        iconCls: 'el-icon-menu',
        //leaf: true,//只有一个节点
        Role:0,
        children: [
            { path: '/CategoryList', component: CategoryList, name: '商品类别管理' },
            { path: '/ProductBrandList', component: ProductBrandList, name: '商品品牌管理' },
            { path: '/ProductTemplateList', component: ProductTemplateList, name: '商品模板管理' },
            { path: '/ProductSpecificationLsit', component: ProductSpecificationLsit, name: '商品规格管理' },
            { path: '/CategoryChildList', component: CategoryChildList, name: '商品分类子类',hidden:true  },
            { path: '/CategoryAdd', component: CategoryAdd, name: '添加商品分类' ,hidden:true  },
            { path: '/CategoryUpdate', component: CategoryUpdate, name: '修改商品分类信息',hidden:true  },
            { path: '/ProductBrandAdd', component:  ProductBrandAdd, name: '添加商品品牌' ,hidden:true  },
            { path: '/ProductBrandUpdate', component:  ProductBrandUpdate, name: '修改商品品牌信息' ,hidden:true  },
            { path: '/ProductSpecOptions', component:  ProductSpecOptions, name: '商品规格选项',hidden:true  },
            { path: '/ProductSpecAdd', component:  ProductSpecAdd, name: '添加商品规格' ,hidden:true  },
            { path: '/ProductSpecOptionAdd', component: ProductSpecOptionAdd, name: '添加商品规格选项' ,hidden:true },
            { path: '/ProductSpecUpdate', component: ProductSpecUpdate, name: '修改商品规格' ,hidden:true },
            { path: '/ProductSpecOptionUpdate', component: ProductSpecOptionUpdate, name: '修改商品规格选项' ,hidden:true },
            { path: '/ProductTemplateAdd', component: ProductTemplateAdd, name: '添加商品模板' ,hidden:true },
            { path: '/ProductTemplateUpdate', component: ProductTemplateUpdate, name: '修改商品模板' ,hidden:true },
            { path: '/ProductManageList', component: ProductManageList, name: '商品审核管理'},


        ]
    },

    {
        path: '/',
        component: Home,
        name: '活动审核',
        iconCls: 'el-icon-menu',
        Role:0,
        children: [
            { path: '/CouponManage', component: CouponManage, name: '优惠券审核' }
        ]
    },

    {
        path: '/',
        component: Home,
        name: '日志审计',
        iconCls: 'el-icon-menu',
        //leaf: true,//只有一个节点
        Role:0,
        children: [
            { path: '/OperateLogManage', component: OperateLogManage, name: '系统操作日志' },

        ]
    },
    {
        path: '/',
        component: Home,
        name: '',
        iconCls: 'el-icon-menu',
        leaf: true,//只有一个节点
        Role:2,
        children: [
            { path: '/Index', component: Index, name: '首页' }
        ]
    },
    {
        path: '/',
        component: Home,
        name: '活动管理',
        iconCls: 'el-icon-menu',
        Role:2,
        children: [
            { path: '/CouponAct', component: CouponAct, name: '优惠券管理' }
        ]
    },
    {
        path: '/',
        component: Home,
        name: '商品管理',
        iconCls: 'el-icon-menu',
        Role:2,
        children: [
            { path: '/ProductManage', component: ProductManage, name: '商品列表' },
            { path: '/ProductDetail', component: ProductDetail, name: '商品详情' ,hidden:true },
            { path: '/ProductAdd', component: ProductAdd, name: '商品添加'  },
            { path: '/ProductUpdate', component: ProductUpdate, name: '修改商品信息' ,hidden:true },
        ]
    },
 /*   {
        path: '/',
        component: Home,
        name: '账号管理',
        iconCls: 'el-icon-menu',
        children: [
            { path: '/user', component: user, name: '页面4' },
            { path: '/page5', component: Page5, name: '页面5' }
        ]
    },*/
    {
        path: '*',
        hidden: true,
        redirect: { path: '/404' }
    }
];

export default routes;